/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const streetRouter = {
  path: '/category',
  component: Layout,
  redirect: '/category/categorylist',
  alwaysShow: true, // will always show the root menu
  name: 'category',
  meta: {
    title: '分类管理',
    icon: 'el-icon-menu',
  },
  children: [{
    path: 'categorylist',
    component: () =>
      import('@/views/category/categorylist/index'),
    name: 'categoryList',
    meta: {
      title: '分类列表',
    }
  },
  {
    path: 'categorylist/create',
    component: () =>
      import('@/views/category/categorylist/create'),
    name: 'createCategory',
    meta: {
      title: '添加分类',
    }
  },
  {
    path: 'categorylist/edit/:id(\\d+)',
    component: () =>
      import('@/views/category/categorylist/edit'),
    name: 'editCategory',
    meta: {
      title: '编辑分类',
    }
  },
  ]
}

export default streetRouter
